package bean;

public class Email implements Comparable<Email> {

	private long	emailID			= 0;
	private long	userID			= 0;
	private String	sender			= null;
	private String	recipient		= null;
	private String	subject			= null;
	private String	content			= null;	
	private String	timestamp		= null; //(date+time)
//	private String	attachment		= null;
//	private String	flag			= null;
//	private boolean	read			= false;
	
	public Email(long emailID) {
		this.emailID = emailID;
	}
	
	public int compareTo(Email other) {
		//order by timestamp
		//need to implement completely
		return 0;
	}

	//need to implement completely
	public boolean equals(Object obj) {
		if (obj instanceof Email) {
			Email other = (Email) obj;
			return emailID==other.emailID;
		}
		return false;
	}

	public String toString() {
		return "Email("+getEmailID()+")";
	}

	public long getUserID() {
		return userID;
	}

	public void setUserID(long userID) {
		this.userID = userID;
	}

	public String getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(String timestamp) {
		this.timestamp = timestamp;
	}

	public long getEmailID() {
		return emailID;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getRecipient() {
		return recipient;
	}

	public void setRecipient(String recipient) {
		this.recipient = recipient;
	}

	
	
	
}
